﻿using System;
using System.Reflection;

namespace Attributes
{
    public class Program
    {
        public static void Main()
        {
            MethodInfo method = typeof(VersionInAction).GetMethod("EmptyMethod");
            Console.WriteLine(method.Name);
            var attributes = method.GetCustomAttributes(false);
            foreach (object attribute in attributes)
            {
                Console.WriteLine(attribute.ToString());
            }


            //MethodInfo[] methods = typeof(Program).GetMethods();
            //foreach (MethodInfo method in methods)
            //{
            //    Console.WriteLine(method.Name);
            //    var attributes = method.GetCustomAttributes(false);
            //    foreach (object attribute in attributes)
            //    {
            //        Console.WriteLine(attribute.ToString());
            //    }
            //    Console.WriteLine();
            //}
        }
    }
}
